/* ============================================
   连连看游戏系统 - 通用样式
   主题色调：现代清新青色 + 简约白
   ============================================ */

/* CSS变量定义 - 统一色调管理 */
:root {
    /* 主色调 - 现代青色渐变 */
    --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --primary-color: #4facfe;
    --primary-dark: #00b8d4;
    --primary-light: #80d0fe;
    
    /* 辅助色 */
    --success-color: #67c23a;
    --warning-color: #e6a23c;
    --danger-color: #f56c6c;
    --info-color: #409eff;
    
    /* 中性色 - 简约灰度 */
    --text-primary: #2c3e50;
    --text-secondary: #606266;
    --text-tertiary: #909399;
    --text-light: #c0c4cc;
    
    /* 背景色 */
    --bg-white: #ffffff;
    --bg-gray-light: #f5f7fa;
    --bg-gray: #e4e7ed;
    
    /* 边框色 */
    --border-light: #e0e0e0;
    --border-base: #dcdfe6;
    --border-dark: #c0c4cc;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 导航栏样式 - 优雅简约 */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 22px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.nav-menu a:hover {
    background: rgba(79, 172, 254, 0.08);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-menu a.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    flex: 1;
}

/* 页面头部 - 优雅简洁 */
.page-header {
    text-align: center;
    color: var(--bg-white);
    padding: 80px 0 40px;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 700;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
}

.page-header .subtitle {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* 卡片样式 - 现代简约 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) 48px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    margin: var(--spacing-lg) auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-title {
    font-size: 26px;
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    letter-spacing: 0.5px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label .required {
    color: #f56c6c;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

/* 文件上传 */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-input {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #f5f7fa;
    border: 2px dashed #d0d0d0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: #f0f3ff;
}

.file-upload-label i {
    font-size: 24px;
    margin-right: 10px;
    color: #667eea;
}

/* 头像预览 */
.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid #667eea;
    display: none;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview.show {
    display: block;
}

/* 按钮样式 - 现代优雅 */
.btn {
    padding: var(--spacing-sm) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-gradient);
    color: var(--bg-white);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #52b030 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(103, 194, 58, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d19020 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(230, 162, 60, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e04848 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 108, 108, 0.3);
}

/* 链接样式 */
.text-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.text-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

/* 提示信息 */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #f0f9ff;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-error {
    background: #fff5f5;
    color: #721c24;
    border-left: 4px solid #f56c6c;
}

.alert-info {
    background: #e7f3ff;
    color: #004085;
    border-left: 4px solid #667eea;
}

/* 页脚 */
.page-footer,
.footer {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.page-footer p,
.footer p {
    margin: 5px 0;
    opacity: 0.8;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 5px 0;
    opacity: 0.8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 分隔线 */
.divider {
    margin: 30px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 36px;
    }
    
    .card {
        padding: 25px;
    }
    
    .container {
        padding: 15px;
    }
}

